package responses

import "time"

type response struct {
	Code int64       `json:"code"`
	Des  string      `json:"des"`
	Time string      `json:"time"`
	Data interface{} `json:"data"`
}

func Response(code int64, des string, data interface{}) response {
	return response{
		Code: code,
		Des:  des,
		Time: time.Now().Format("2006-01-02 15:04:05"),
		Data: data,
	}
}
